#include <cstdio>

long long sum(long long n) {
    if (n == 0) {
        return 0;
    } else if (n % 10 != 0 || n == 10) {
        return sum(n - 1) + n % 10;
    } else {
        return n / 10 * sum(10);
    }
}

int main() {
    long long lo, hi;
    scanf("%lld %lld", &lo, &hi);
    printf("%lld", sum(hi) - sum(lo - 1));
    return 0;
}
